import Mock from "mockjs";
import {
  getUser,
  getUserList,
  userAdd,
  userDel,
  userUpdate,
  updateStatus,
  getRoles,
  setRole,
  getPermissionlist,
  getRoleList,
  deletePermission,
  getpermissiontree,
  menus
} from "./response/user.js";

// Mock.mock(/\/login/, "post", {
//   username: "admin",
//   password: "123",
//   msg: "success"
// });

// 获取导航栏菜单信息
Mock.mock(/\/menus/, "get", menus);

// 获取树形结构数据
Mock.mock(/\/getpermissiontree/, "get", getpermissiontree);

//删除权限
Mock.mock(/\/deletePermission/, "delete", deletePermission);

// 模拟获取用户角色权限列表
Mock.mock(/\/getRoleList/, "get", getRoleList);

// 模拟获取用户权限列表
Mock.mock(/\/permissionlist/, "get", getPermissionlist);

//模拟登录
Mock.mock(/\/login/, "post", getUser);

// 模拟获取用户列表
Mock.mock(/\/users/, "get", getUserList);

// 模拟添加用户
Mock.mock(/\/userAdd/, "post", userAdd);

// 模拟删除用户
Mock.mock(/\/delUserById/, "delete", userDel);

// 模拟修改用户
Mock.mock(/\/editUser/, "put", userUpdate);

//修改用户状态
Mock.mock(/\/changeStatus/, "put", updateStatus);

// 模拟用户获取角色
Mock.mock(/\/getRoleId/, "get", getRoles);

// 模拟设置角色
Mock.mock(/\/setRole/, "put", setRole);

export default Mock;
